<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
    <div id="box">
        <input type="password" v-model="mytext">
        {{mytext}}

        <textarea v-model="mytext"></textarea>

        <h2>多选-checkbox</h2>
        <!-- v-model 对于表单绑定的用法-->
        <input type="checkbox" v-model="checkGroup" value="vue">vue
        <input type="checkbox" v-model="checkGroup" value="react">react
        <input type="checkbox" v-model="checkGroup" value="juquery">juquery
        <button @click="hanleSubmit()">提交</button>
        
    </div>

    <script>
        var vm = new Vue ({
            el:"#box",
            data: {
                mytext:'',
                checkGroup:[]
            },
            methods:{
                hanleSubmit(){
                    console.log('提交', this.checkGroup)
                }
            }
        })
    </script>
</body>
</html>